define(()=>{
    return function(data, box){
        let str = "";
        data.forEach(val=>{
            str += `<div class="box " index="${val.proId}">
                    <a href="./goodsminute.html?id=${val.proId}">
                        <img src="${val.imgs1}" alt="">
                        <p>${val.proName}</p>
                        <span>${val.price}</span>
                    </a>
                    <input type="button" class="add" value="加入购物车">
                    </div>`
        })
        box.html(str);
    }
})